A dynamic, portable and safe approach to byte-code transformation
نویسندگان
چکیده
A powerful feature of the Java programming language is its user-definable class loading policy, which when combined with the namespace independence between class loaders, allows portable implementation of semidynamic program transformations. Such transformations can be used for a range of purposes, including optimization and semantic extension. In this paper we present a framework for semantic extensions in Java. This framework consists of a number of simple but powerful transformations that, among other things, allow us to semantically extend Java to provide orthogonal persistence. The use of semi-dynamic program transformations lends our orthogonally persistent Java a number of important qualities, including simplicity, portability and a clean model of persistence. Significantly, our implementation is efficient, outperforming PJama, a well-known orthogonally persistent Java, which is based on a modified virtual machine. In addition to describing the application of these transformations to orthogonally persistent Java, we foreshadow their use in a number of other contexts, including implementing multiple inheritance for Java, and dynamic instance and class versioning.
منابع مشابه
Not all bytes are equal: Neural byte sieve for fuzzing
Fuzzing is a popular dynamic program analysis technique used to find vulnerabilities in complex software. Fuzzing involves presenting a target program with crafted malicious input designed to cause crashes, buffer overflows, memory errors, and exceptions. Crafting malicious inputs in an efficient manner is a difficult open problem and often the best approach to generating such inputs is through...
متن کاملByte Code Engineering
The term “Java” is used to denote two different concepts: the language itself and the related execution environment, the Java Virtual Machine (JVM), which executes byte code instructions. Several research projects deal with byte code-generating compilers or the implementation of new features via byte code transformations. Examples are code optimization, the implementation of parameterized types...
متن کاملAutomatically Exploiting Implicit Parallelism in Multi-way Recursive Methods in Java
In this paper we show how implicit parallelism in multi-way recursive methods, typically used to implement tree traversal or divide-and-conquer algorithms, can be made explicit by a restructuring compiler using the multi-threading mechanism of Java. Expressing parallelism in Java itself clearly has the advantage that the transformed program remains portable. After compilation of the transformed...
متن کاملAutomatic Transformation of Bit-Level C Code to Support Multiple Equivalent Data Layouts
Portable low-level C programs must often support multiple equivalent in-memory layouts of data, due to the byte or bit order of the compiler, architecture, or external data formats. Code that makes assumptions about data layout often consists of multiple highly similar pieces of code, each designed to handle a different layout. Writing and maintaining this code is difficult and bug-prone: Becau...
متن کاملSymbolic Safety
One of the biggest challenges in operating systems, distributed systems, and mobile code is how to ensure safety of untrusted code. Two recent proposals are Software Fault Isolation (SFI) and Proof-Carrying Code (PCC). A diicult challenge is how to deal with memory accesses within loops. SFI generates run-time bounds checks at every access, which incurs non-negligible overhead in tight loops, w...
متن کامل